﻿using System;
using System.Collections.Generic;
using System.Text;
using T.FAS.Runtime.Base.Entity;
using T.FAS.Runtime.Metadata.Entity;
using T.ServiceComponent.Kernel.Service;

namespace T.FAS.Runtime.Metadata.SPI
{
    /// <summary>
    /// 运行时元数据管理服务接口
    /// </summary>
    [HSFService(Describtion = "运行时元数据管理服务接口", ImpAssembly = "T.FAS.Runtime.Metadata.Service.dll",
           ImpClass = "T.FAS.Runtime.Metadata.Service.MeteDataService", ServiceID = "T.FAS.Runtime.Metadata.SPI.IMetaDataService", ServiceType = ServiceType.Retrieve)]
    public interface IMetaDataService
    {
        /// <summary>
        /// 获取元数据
        /// </summary>
        /// <param name="metaDataId">元数据ID</param>        
        /// <returns>元数据</returns>      
        IMetaData GetMetaData(string metaDataId);

        /// <summary>
        /// 获取元数据
        /// </summary>
        /// <param name="metaDataId">元数据ID</param>        
        /// <returns>元数据</returns>      
        IMetaData GetMetaDataByCode(string metaDataCode, string metaTypeID);

        /// <summary>
        /// 获取元数据
        /// </summary>
        /// <param name="metaDataId">元数据ID</param>    
        /// <param name="version">元数据版本</param>
        /// <returns>元数据</returns>
        IMetaData GetMetaDataByVersion(string metaDataId, string version);

        /// <summary>
        /// 获取具体的元数据
        /// </summary>
        /// <param name="metaDataId">元数据ID</param>        
        /// <returns>具体的元数据</returns>
        IMetaDataContent GetMetaDataContent(string metaDataId);

        /// <summary>
        /// 获取具体的元数据
        /// </summary>
        /// <param name="metaDataId">元数据ID</param>      
        /// <param name="version">元数据版本</param>
        /// <returns>具体的元数据</returns>
        IMetaDataContent GetMetaDataContentByVersion(string metaDataId, string version);

        TResult CreateInstance(string metaDataId);
    }
}


